package ru.amse.tsyganov.jumleditor.view;

import java.util.List;

import org.eclipse.swt.graphics.GC;

import ru.amse.tsyganov.jumleditor.model.ModelElement;

public abstract class ViewElement<T extends ModelElement> {
	private T model;
	
	public final T getModel() {
		assert model != null;
		return model;
	}
	
	public final void setModel(T model) {
		if (model == null) {
			throw new IllegalArgumentException();
		}
		this.model = model;
	}

	public abstract void accept(Visitor v);
	public abstract void paint(GC gc);
	
	public abstract List<? extends ActivePoint> getActivePoints();
}
